<template>
  <div>
    <a-table
      :dataSource="dataSource"
      :columns="columns"
      :pagination="false"
    >
      <template #bodyCell="{ column, text, record }">
        <!-- <template v-if="column.key === 'operation'">
          <a-tag :key="grade" :color="grade === '90' ? '#C21C1C' : '#4CBC57'">
            <template #icon>
              <check-outlined />
            </template>
            通过
          </a-tag>
        </template> -->
        <template v-if="column.key === 'operation'">
          <a-tag :key="grade" :color="grade <= '60' ? '#4CBC57' : '#C21C1C'">
            <template #icon>
              <exclamation-circle-outlined />
            </template>
            不通过
          </a-tag>
        </template>
      </template>
    </a-table>
  </div>
</template>

<script setup>
import { CheckOutlined,ExclamationCircleOutlined } from "@ant-design/icons-vue";
const dataSource = [
  // {
  //   // id: "20222473",
  //   name: "李富贵",
  //   college: "信息工程学院",
  //   major: "会计电算化",
  //   class: "1901",
  //   thesisname: "会计嗲酸化ixngbu",
  //   teacher: "亲关山",
  //   grade: "90",
  // },
  {
    // id: "20222473",
    name: "zs",
    college: "信息工程学院",
    major: "会计电算化",
    class: "1901",
    thesisname: "会计嗲酸化ixngbu",
    teacher: "亲关山",
    grade: "50",
  },
];

const columns = [
  {
    title: "姓名",
    dataIndex: "name",
    key: "name",
  },
  {
    title: "学院",
    dataIndex: "college",
    key: "college",
  },
  {
    title: "专业",
    dataIndex: "major",
    key: "major",
  },
  {
    title: "班级",
    dataIndex: "class",
    key: "class",
  },
  {
    title: "论题名称",
    dataIndex: "thesisname",
    key: "thesisname",
  },
  {
    title: "指导老师",
    dataIndex: "teacher",
    key: "teacher",
  },
  {
    title: "老师评分",
    dataIndex: "grade",
    key: "grade",
  },
  {
    title: "操作",
    dataIndex: "operation",
    key: "operation",
  },
];
const onDelete = (id) => {
  // console.log(id)
  // console.log(dataSource.value)
  // dataSource.value = dataSource.value.filter((item) => item.id !== id);
};
</script>

<style lang="scss" scoped></style>
